<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app"></div>
    <script src="../vuejs/vue.js"></script>
    <template id="my-app">
        <ul>
            <!-- 遍历数组 -->
            <h1>电影列表</h1>
            <!-- <li v-for="movie in movies">{{movie}}</li> -->
            
            <li v-for="(movie,index) in movies">{{index+1}}.{{movie}}</li>
            <!-- 遍历对象 -->
            <h1>个人信息</h1>
            <li v-for="(value,key,index) in info">{{value}}-{{key}}--{{index}}</li>
            <h1>数字遍历</h1>
            <li v-for="(num,index) in 10">{{num}}--{{index}}</li>
        </ul>
    </template>
    <script>
        Vue.createApp({
            template:`#my-app`,
            data(){
                return{
                    movies:[
                        '星际穿越',
                        '教父',
                        '你好，李焕英',
                        '抓娃娃'
                    ],
                    info:{
                        name:'why',
                        age:18,
                        height:1.88
                    }
                }
            }

        }).mount('#app')
    </script>
</body>
</html>